/* 
 * File:   NewStackCommand.h
 * Author: Gab'z
 *
 * Created on 5 juin 2012, 02:35
 */

#ifndef NEWSTACKCOMMAND_H
#define	NEWSTACKCOMMAND_H

#include "StackListCommand.h"

namespace calculator {

    class NewStackCommand : public StackListCommand {
        friend class CommandMap;

    public:
        virtual ~NewStackCommand();

        std::string isExecutable() const;
        virtual NewStackCommand* clone() const;

        const Memento* createMemento() const throw (CommandException);
        void restoreFromMemento(const Memento* memento) const throw (MementoException);

    protected:
        
    private:
        void apply(StackList* stacklist) const throw (CommandException);

        NewStackCommand(const std::string name);
        NewStackCommand(const NewStackCommand& orig);
    };

}

#endif	/* NEWSTACKCOMMAND_H */

